#include<iostream>
using namespace std;
int main()
{
	int A, B, a, b, L;
	cin >> A >> B >> L;
	double mi = 1e9;
	for (int i = 0; i <= L; i++) {
		for (int j = 1; j <= L; j++) {
			double x = (double)i * 1.0 / j;
			double X = (double)A * 1.0 / B;
			if (x >= X && x - X < mi) {
				mi = x - X;
				a = i, b = j;
			}
		}
	}
	cout << a << " " << b << endl;
	return 0;
}